import { QuestionCircleFilled } from "@ant-design/icons"
import { Tooltip } from "antd"
import { ColumnGroupType, ColumnType } from "antd/es/table"

const memberTableList = (newFormat: (arg: string) => string): Record<string, ColumnGroupType<any> | ColumnType<any>> => ({
	teamMemberList_cycleDate: {
		key: "teamMemberList_cycleDate",
		align: "center",
		dataIndex: "cycleDate",
		title: newFormat("funds.proxy_member_funds_record.settlement_cycle"),
		width: 400,
		render: (sort: number) => <span>{sort}</span>
	},
	teamMemberList_updatedAt: {
		key: "teamMemberList_updatedAt",
		align: "center",
		dataIndex: "updatedAt",
		title: newFormat("member.user_info.update_time"),
		width: 200
	},
	teamMemberList_memberName: {
		key: "teamMemberList_memberName",
		align: "center",
		dataIndex: "memberName",
		title: newFormat("funds.bonusReviewRecord.general_agent"),
		width: 180
	},
	teamMemberList_parentProxyName: {
		key: "teamMemberList_parentProxyName",
		align: "center",
		dataIndex: "parentProxyName",
		title: newFormat("common.member_number"),
		width: 180
	},
	teamMemberList_topProxyName: {
		key: "teamMemberList_topProxyName",
		align: "center",
		dataIndex: "topProxyName",
		title: newFormat("common.top_agent"),
		width: 150
	},
	teamMemberList_netAmount: {
		key: "teamMemberList_netAmount",
		align: "center",
		dataIndex: "netAmount",
		title: (
			<span>
				{newFormat("funds.bonusReviewRecord.net_amount")}
				<Tooltip title={newFormat("funds.fund_audit.tooltip_netAmount")}>
					<QuestionCircleFilled style={{ marginLeft: 4 }} />
				</Tooltip>
			</span>
		),
		width: 200
	},
	teamMemberList_adjustmentAmount: {
		key: "teamMemberList_adjustmentAmount",
		align: "center",
		dataIndex: "adjustmentAmount",
		title: (
			<span>
				{newFormat("funds.bonusReviewRecord.level_change")}
				<Tooltip title={newFormat("funds.fund_audit.tooltip_adjusment")}>
					<QuestionCircleFilled style={{ marginLeft: 4 }} />
				</Tooltip>
			</span>
		),
		width: 200
	},
	teamMemberList_lastPeriodShouldReceiptPaymentParentAmount: {
		key: "teamMemberList_lastPeriodShouldReceiptPaymentParentAmount",
		align: "center",
		dataIndex: "lastPeriodShouldReceiptPaymentParentAmount",
		title: newFormat("funds.bonusReviewRecord.receivable_period"),
		width: 200
	},
	teamMemberList_lastPeriodShouldReceiptPaymentParentAmount_lower: {
		key: "teamMemberList_lastPeriodShouldReceiptPaymentParentAmount_lower",
		align: "center",
		dataIndex: "lastPeriodShouldReceiptPaymentParentAmount_lower",
		title: newFormat("funds.bonusReviewRecord.payable_period"),
		width: 200
	},
	teamMemberList_shouldPaymentReceiptParentAmount: {
		key: "teamMemberList_shouldPaymentReceiptParentAmount",
		align: "center",
		dataIndex: "shouldPaymentReceiptParentAmount",
		title: (
			<span>
				{newFormat("funds.bonusReviewRecord.current_payable")}
				<Tooltip title={newFormat("funds.fund_audit.tooltip_payment_received")}>
					<QuestionCircleFilled style={{ marginLeft: 4 }} />
				</Tooltip>
			</span>
		),
		width: 200
	},
	teamMemberList_shouldPaymentReceiptParentAmount_greater: {
		key: "teamMemberList_shouldPaymentReceiptParentAmount_greater",
		align: "center",
		dataIndex: "shouldPaymentReceiptParentAmount_greater",
		title: (
			<span>
				{newFormat("funds.bonusReviewRecord.current_receivable")}
				<Tooltip title={newFormat("funds.fund_audit.tooltip_payment_received_1")}>
					<QuestionCircleFilled style={{ marginLeft: 4 }} />
				</Tooltip>
			</span>
		),
		width: 200
	},
	teamMemberList_action: {
		key: "teamMemberList_action",
		align: "center",
		dataIndex: "action",
		title: newFormat("common.actions"),
		fixed: "right",
		width: 200
	}
})
export default memberTableList
